package com.hxtec.polaris.commons.constant;

import java.io.File;
import java.util.Arrays;
import java.util.List;

/**
 * @Describtion 通用的常量，禁止继承
 * @Author yonyong
 * @Date 2019/11/26 9:58
 * @Version 1.0.0
 **/
public final class GlobalVar {
    /**
     * 禁止实例化
     */
    private GlobalVar(){}

    /**
     * 符号
     */
    //分隔符
    public final static String SEPARATOR = "-";
    public final static String NO = "N";

    /**
     * 线程池名
     */
    //分类构建路径线程
    public final static String THREAD_CATEGORY_BUILD_PATH= "category-path-%d";
    //浏览记录入库线程
    public final static String THREAD_HISTORY_INSERT= "history-insert-%d";

    /**
     * 其他
     */
    //商品排序依据 1 综合排序 2 销量排序 3 价格排序升序 4价格排序降序
    public final static List<String> PRUDUCT_ORDER_LIST = Arrays.asList("1","2","3","4");
    public final static String TOURIST = "tourist";
    //历史记录保存条数
    public final static int HISTORY_ROWS = 30;

    //订单状态管理 state 0 待付款 1 待发货订单 2待收货订单 3待评价订单 4 交易成功订单 5 已关闭订单
    //待付款
    public static final int ORDER_PAYING = 0;
    //待发货
    public static final int ORDER_SHIPING = 1;
    //待收货
    public static final int ORDER_RECIIVEING = 2;
    //待评价
    public static final int ORDER_REPLYING = 3;
    //交易成功
    public static final int ORDER_SUCCESS = 4;
    //已关闭
    public static final int ORDER_CLOSED = 5;
    //已删除
    public static final int ORDER_DELETED = 6;

    //延时收货时间 默认为3天
    public static final int DELAY_TIME = 3;

    //文件映射mapping
    public static final String FILE_MAPPING_PATH = "document";
    //上传文件存储路径
    public static final String UPLOAD_BASE_PATH = System.getProperty("user.home")+File.separator + "Polarisdoc"+File.separator;
    //    public static final String CATEGORY_IMG_PATH = File.separator +"upload" + File.separator + "category";
    //管理员上传分类图片 存储路径
    public static final String CATEGORY_IMG_PATH = "upload" + File.separator + "category";
    //管理员上传轮播图图片 存储路径
    public static final String CAROUSE_IMG_PATH = "upload" + File.separator + "carouse";


    //订单相关
    //操作方
    //用户
    public static final String OPERATER_USER = "用户";
    //管理员
    public static final String OPERATER_ADMIN = "后台管理员";
    //系统自动
    public static final String OPERATER_AUTO = "系统执行";
}
